<?php

/**
 * customarOrder admin form
 *
 * @package    trunk
 * @subpackage customarOrder
 * @author     Your name here
 */
class CustomarOrderAdminForm extends BaseCustomarOrderForm
{
  public function configure()
  {
    parent::configure();

        $customarOrderProductGroupForm = new BaseForm();

        $i = 0;
        foreach ($this->getObject()->getCustomarOrderProducts() as $customarOrderProduct)
        {
          $customarOrderProductForm = new CustomarOrderProductAdminForm($customarOrderProduct);
          $customarOrderProductGroupForm->embedForm('customar_order_product_'.$i, $customarOrderProductForm);
          $customarOrderProductGroupForm->widgetSchema['customar_order_product_'.$i]->setLabel('&nbsp;');
          $i++;
        }

        $this->embedForm('customar_order_product', $customarOrderProductGroupForm);
  }
}